<?php
$lang_name = "";
$lang_code = "";
$actived = "";
$isdefault = "";
if(!empty($language)){
    $lang_code = $language->lang_code;
    $lang_name = $language->lang_name;
    $actived = $language->actived;
    $isdefault = $language->is_default; 
    if($isdefault==1)
    {
        $isdefault="selected=selected";
    }

    if($actived==1)
    {
        $actived="selected=selected";
    }
}
    
?>
<div class="" id="myModal" >
  <div class="modal-header">
    <h3 style="text-transform: capitalize;"><?php echo $action ?> language</h3>
  </div>
  <?php echo form_open('administrator/setting/language/save') ?>
    <label for="name">Language name:</label><input type="text" value="<?php echo $lang_name ?>" name="name" id="name" />
    <label for="name">Language code:</label><input type="text" value="<?php echo $lang_code ?>" name="code" id="code" />
    <label for="name">Is default:</label>
    <select name="isdefault">
        <option <?php echo $isdefault ?> value="0">No</option>
        <option  <?php echo $isdefault ?> value="1">Yes</option></select>
    <label for="name">Active this language:</label>
    <select name="actived"><option  <?php echo $actived ?> value="0">No</option><option <?php echo $actived ?>  value="1">Yes</option></select>
    <input type="hidden" name="action"  value="<?php echo $action ?>" id="action" />
    <input type="hidden" name="lang_id"  value="<?php echo $lang_id ?>" id="action" />
  <div class="modal-footer">
    <input type="submit" class="btn btn-primary"  value="Save"/>
    <a href="<?php echo base_url().'/administrator/setting/language/'?>" class="btn">Cancel</a>
  </div>
  </form>
</div>